﻿Imports Microsoft.VisualBasic
Imports ADOEntity
Imports System.Data
Imports System.Data.SqlClient

Public Class clsEdmConfig

    Dim configEdmx As systemConfigEntities = New systemConfigEntities
    Dim clsLINQToDataTable As New clsLINQToDataTable
    Dim ds As New DataSet

    Sub loadDataSetConfig() 'คิวรีข้อมูล config มาใส่ใน dataset

        Dim dt As DataTable = clsLINQToDataTable.LINQToDataTable( _
                            (From ConfigQ In configEdmx.SSYSTEMCONFIG _
                            Select ConfigQ.CONFIGCODE, ConfigQ.CONFIGDESC, ConfigQ.CONFIGNUM, _
                            ConfigQ.CONFIGSTR, ConfigQ.ConfigSelect).ToList, "dsConfig")
        ds.Tables.Add(dt)

    End Sub

End Class
